#求以下三数的和,保留2位小数 1~a之和 1~b的平方和 1~c的倒数和

def calculate_sums(a, b, c):

    # 计算a数列
    Sa = a * (a + 1) // 2

    # 计算b序列
    Sb = b * (b + 1) * (2 * b + 1) // 6

    # 计算c序列
    Sc = sum(1 / i for i in range(1, c + 1))

    #求和
    total_sum = round(Sa + Sb + Sc, 2)
    return total_sum

if __name__ == '__main__':
    a = 10
    b = 1022
    c = 101
    print(calculate_sums(a, b, c))

